package com.example.toolkit;


import org.apache.commons.io.IOUtils;

import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ConvertUtil {
    private Logger logger = LoggerFactory.getLogger(ConvertUtil.class);
    public String UTF8ToString(byte[] data) {
        String str = null;

        try {
            str = IOUtils.toString(data, "UTF-8");
        } catch (IOException e) {
            logger.error(e.toString());
        }
        return str;
    }
}
